package com.bit.deom.mapper;

import com.bit.deom.model.MessageInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MessageInfoMapper {

    @Select("select `from`, `to`, `message` from message_info where delete_flag = 0 ")
    List<MessageInfo> queryAll();

    @Insert("insert into message_Info (`from`, `to`, `message`) values (#{from}, #{to}, #{message})")
    Integer addMessage(MessageInfo messageInfo);

}
